package com.basic.modules.nykf.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.basic.modules.nykf.entity.CustomerShopBusinessEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

@Mapper
public interface CustomerShopBusinessDao extends BaseMapper<CustomerShopBusinessEntity> {

    List<CustomerShopBusinessEntity> getXfywListBySfmsValAndCustomerId(Map map);

    // 获取业务名称序号
    List<CustomerShopBusinessEntity> getYwmcXh(Long shopId);

    // 根据业务ID查询业务信息
    CustomerShopBusinessEntity getCustomerShopBusinessInfoById(Long customerShopBusinessId);

    // 根据客户ID和收费模式修改业务底薪是null的数据
    int updateYwdxIsZero(@Param("customerId") Long customerId, @Param("sfmsVal") String sfmsVal);

    // 根据客户ID和收费模式修改业务底薪不是0的数据
    int updateYwdxIsNoZero(@Param("customerId") Long customerId, @Param("sfmsVal") String sfmsVal, @Param("ywdx") BigDecimal ywdx);

    int getSumZxlBySfmsValAndCustomerId(@Param("customerId") Long customerId, @Param("sfmsVal") String sfmsVal);
}
